package com.agentfactory.teleoreactive.core;
import com.agentfactory.logic.update.lang.Predicate;
import com.agentfactory.platform.core.IMessage;
import com.agentfactory.teleoreactive.interpreter.Utilities;
import com.agentfactory.teleoreactive.interpreter.mentalstate.Sensor;

public class InboxSensor extends Sensor {

	@Override
	public void perceive() {
        for (IMessage message: agent.getInbox()) {
        	String p = message.getPerformative();
        	String from = message.getSender().toFOSString();
        	String content = message.getContent();
        	agent.addBelief((Predicate) Utilities.factory.createFormula(content));
        }
	}

}
